<template>
	<div id="wrapper">
		<webview ref="webview" id="wb" src="http://192.168.20.19/index.html" />
	</div>
</template>

<script>
import SystemInformation from './LandingPage/SystemInformation'

export default {
	name: 'landing-page',
	components: { SystemInformation },
	mounted() {
		const webview = this.$refs.webview;
		let preloadFile = 'file://' + require('path').resolve('src/renderer/preload/index.js');
		console.log(preloadFile)
		if (process.env.NODE_ENV === 'production') {
			preloadFile = `file://${global.__static}/preload.js`
		}
		webview.setAttribute('preload', preloadFile)
	},
	methods: {
		open(link) {
			this.$electron.shell.openExternal(link)
		}
	}
}
</script>

<style>
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro");

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: "Source Sans Pro", sans-serif;
}

#wrapper {
	background: radial-gradient(
		ellipse at top left,
		rgba(255, 255, 255, 1) 40%,
		rgba(229, 229, 229, 0.9) 100%
	);
	height: 100vh;
	width: 100vw;
}
#wb {
	height: 100vh;
	width: 100vw;
}
</style>
